package com.lxy;


import javafx.scene.input.DataFormat;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class test {
    public static void main(String[] args) {

        //2025-04-15T21:12:13.659
        String dateTime = LocalDateTime.now().toString();

        String dateTime2 = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));

        String name = "a.aa.txt";
        String nameSubString = name.substring(name.lastIndexOf("."));
        System.out.println(dateTime2);

        System.out.println("nameSubString>>>"+nameSubString);

    }
}
